/* eslint-disable */
import { SingleTableMixins } from '@/mixins/SingleTableMixins'
import Pagination from '@/components/Pagination'
import UsedAsset from '../modules/UsedAsset'
import ReturnModal from '../modules/ReturnModal'
import renewal from './renewal'
import move from './move'
import ReturnRecordList from './returnRecordList'


export default {
  mixins: [ SingleTableMixins ],
  components: {Pagination, UsedAsset, ReturnModal, renewal, move,ReturnRecordList},
  data() {
    return {
      url:{
        list: "/retrocede/listAsset",
      },
      /* 排序参数 */
      isorter:{
        column: 'dueDate',
        order: 'asc',
      },
      // 表单数据选择
      multipleSelection: [],

    }
  },
  mounted() {

  },
  methods: {


    // 表单数据选择
    handleSelectionChange(selection) {
      this.price = 0;
      selection.forEach(element => {
        this.price += parseInt(element.price)
      });
      this.multipleSelection = selection;
    },

    handleReturn(){
      this.$refs.returnForm.add(this.multipleSelection,);
    },
    handleRenewal(){
      this.$refs.renewalForm.add(this.multipleSelection,);
    },
    handleMove(){
      this.$refs.moveForm.add(this.multipleSelection, this.price);
    }

  }
}
